import { VuexModule, Module, Mutation, getModule } from 'vuex-module-decorators'
import store from '@/store'

export interface IAppState {
  collapse: boolean
}

@Module({ dynamic: true, store, name: 'app' })
class App extends VuexModule implements IAppState {
  collapse = false

  get getCollapse() {
    return this.collapse
  }

  @Mutation
  setCollapse(value: boolean) {
    this.collapse = value
  }
}

export const AppModule = getModule(App)
